package com.ym.soso.domain.param;

import com.ym.common.constant.BeanCovert;
import com.ym.soso.domain.entity.RegistryWayEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 挂号方式对象 registry_way
 *
 * @author ym
 * @date 2020-09-02
 */
@ApiModel("挂号方式-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegistryWayUpdateParam extends BeanCovert<RegistryWayEntity>{

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("类型,01医院02中医堂")
    @NotEmpty(message = "类型,01医院02中医堂不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "类型,01医院02中医堂长度超过{max}", groups = {Add.class, Update.class})
    private String theType;

    @ApiModelProperty("相关ID")
    @NotNull(message = "相关ID不能为空", groups = {Add.class, Update.class})
    private Long relationId;

    @ApiModelProperty("挂号方式 ,01公众号 02小程序 03电话 04APP 05官网")
    @NotEmpty(message = "挂号方式,01公众号02小程序03电话04APP05官网不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "挂号方式,01公众号02小程序03电话04APP05官网长度超过{max}", groups = {Add.class, Update.class})
    private String theWay;

    @ApiModelProperty("描述")
    @Size(max = 6000, message = "描述长度超过{max}", groups = {Add.class, Update.class})
    private String describ;

    @ApiModelProperty("跳转链接")
    @Size(max = 2000, message = "跳转链接长度超过{max}", groups = {Add.class, Update.class})
    private String targetUrl;

    @ApiModelProperty("创建人")
    @NotNull(message = "创建人不能为空", groups = {Add.class, Update.class})
    private Long creSb;

    @ApiModelProperty("创建时间")
    @NotNull(message = "创建时间不能为空", groups = {Add.class, Update.class})
    private Date creTime;

    @ApiModelProperty("更新人")
    private Long uptSb;

    @ApiModelProperty("更新时间")
    private Date uptTime;

    @ApiModelProperty("删除标志")
    @NotEmpty(message = "删除标志不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "删除标志长度超过{max}", groups = {Add.class, Update.class})
    private String deleted;

}
